package edu.xupt.ediction.slice;

import edu.xust.ediction.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.*;


public class SettingAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_setting);
        //设置返回按钮跳转到搜索界面
        Image setting_return=(Image)this.findComponentById(ResourceTable.Id_sz_return);
        setting_return.setClickedListener(component ->present(new SearchAbilitySlice(),new Intent()));
        //设置跳转到收藏界面
        Text soucang=(Text)this.findComponentById(ResourceTable.Id_text_sc);
        soucang.setClickedListener(component ->present(new CollectionAbilitySlice(),new Intent()));
        //设置跳转到关于我们界面
        Text about=(Text) this.findComponentById(ResourceTable.Id_text_about);
        about.setClickedListener(component ->present(new AboutusAbilitySlice(),new Intent()));
        //设置跳转到反馈界面
        Text fankui=(Text) this.findComponentById(ResourceTable.Id_text_fk);
        fankui.setClickedListener(component ->present(new FankuiAbilitySlice(),new Intent()));

    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
